package com.situ.day12lianxi;

public class AccountAdmin {
	private Double balance;
	private Integer number;

	public AccountAdmin() {
		balance = 0.0;
//		this.number = number;
	}

	// 存钱
	public void cunQian(double amount) {
		balance += amount;
	}

	// 取钱
	public void quQian(double amount) throws MeiQianException {
		if (amount <= balance) {
			balance -= amount;
		} else {
			double need = amount - balance;
			throw new MeiQianException(need);
		}
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

}
